<Window x:Class="Genuilder.GUI.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:Genuilder.GUI"
		xmlns:slash="clr-namespace:SlasheneFramework.UI;assembly=SlasheneFramework.UI"
    Title="Genuilder GUI" SizeToContent="WidthAndHeight">
	<StackPanel x:Name="root">
		<StackPanel.Resources>
			<ControlTemplate x:Key="next">
				<Image  Source="Next.png" Width="22" Height="22" ></Image>
			</ControlTemplate>
			<ControlTemplate x:Key="done">
				<Image Source="Done.png" Width="22" Height="22" ></Image>
			</ControlTemplate>
		</StackPanel.Resources>
		<StackPanel Orientation="Horizontal">
			<Image Source="Solution.jpeg"></Image>
			<slash:FileField SelectedPath="{Binding SolutionFile, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"></slash:FileField>
		</StackPanel>
		<TextBlock Text="{Binding Error}" Foreground="Red"></TextBlock>
		<ListView ItemsSource="{Binding Projects}">
			<ListView.ItemContainerStyle>
				<Style TargetType="{x:Type ListViewItem}">
					<Setter Property="IsSelected" Value="{Binding IsSelected}"></Setter>
				</Style>
			</ListView.ItemContainerStyle>
			<ListView.ItemTemplate>
				<DataTemplate>
					<StackPanel Orientation="Horizontal">
						<Image Source="Project.jpeg"></Image>
						<TextBlock Text="{Binding Name}"></TextBlock>
					</StackPanel>
				</DataTemplate>
			</ListView.ItemTemplate>
		</ListView>
		<Button Command="{Binding Go}">
			<CheckBox  IsEnabled="False" IsChecked="{Binding Done, Mode=OneWay}" >
				<CheckBox.Style>
					<Style TargetType="{x:Type CheckBox}">
						<Setter Property="Template" Value="{StaticResource next}"></Setter>
						<Style.Triggers>
							<Trigger Property="IsChecked" Value="true">
								<Setter Property="Template" Value="{StaticResource done}"></Setter>
							</Trigger>
						</Style.Triggers>
					</Style>
				</CheckBox.Style>
			</CheckBox>
		</Button>
	</StackPanel>
</Window>
